package com.taotao.observer.listener;

import com.taotao.observer.entity.MsgEntity;
import javafx.application.Application;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @Author: wangjin
 * @CreateTime: 2022-07-02  22:05
 */
@Slf4j
@Component
public class WeChatMessageListener implements ApplicationListener<MsgEntity> {
    @Async
    @Override
    public void onApplicationEvent(MsgEntity event) {
        int i=1/0;
        //发送微信
        log.info("<发送微信:{}>",event.toString());
    }
}
